{config_load file='site.conf' section='site_new'}
{include file='header.tpl'}
{literal}
 <SCRIPT LANGUAGE="JavaScript">
 <!--	
    $().ready(function() {		   
		$("#blogForm").validate({
			rules: {
				blog_title: "required",
				blog_url: {
					required: true,
					url: true
				},
				rss_url: {
					url: true
				}
			},
			messages: {
				blog_title: "ブログのタイトルは必須です",
				blog_url: {
					required: "ブログのURLは必須です",
					url: "正しくURLを入力してください。"
				},
				rss_url: {
					url: "正しくURLを入力してください。"
				}
			}
		});
	
	});
	
	function doBack()
	{
		location.href="site_index.php";
	}
	
	
 //-->
 </SCRIPT>
{/literal}


<div id="bg">
	<div id="page">
		<div id="content">
		{if $msg ne ""}<div class="errorMsg">{$msg}</div>{/if}
			<div class="post">
				<h2 class="title">ブログ新規</h2>
				<div class="entry">
				<form id="blogForm" name="blogForm" action="{$SCRIPT_NAME}" method="post" >
				<input type="hidden" name="action" id="action" value="Insert"/>
				<table width="600" id="tb_form">
				  <tr>
				    <th>タイトル<span class="required">(必須)</span></th>
				    <td><input name="blog_title" type="text" id="blog_title" size="50" maxlength="200" value="{$formvars.blog_title|escape}"></td>
				  </tr>
				  <tr>
				    <th>URL<span class="required">(必須)</span></th>
				    <td><input name="blog_url" type="text" id="blog_url" size="50" maxlength="200" value="{$formvars.blog_url|escape}">
				  </tr>
				  <tr>
				    <th>RSS URL </th>
				    <td><input name="rss_url" type="text" id="rss_url" size="50" maxlength="200" value="{$formvars.rss_url|escape}"></td>
				  </tr>
				   <tr>
				    <th>ステータス</th>
				    <td>
					{html_radios name=open_flag options=$statusList selected=$formvars.open_flag|default:0}
					</td>
				  </tr>
				  <tr>
				    <th>国</th>
				    <td>
					{html_options name=country_id options=$countryList selected=$formvars.country}
					</td>
				  </tr>
				  <tr>
				    <th>言語</th>
				    <td>
					{html_options name=lang_id options=$langList selected=$formvars.lang_id}
					</td>
				  </tr>
				  <tr>
				    <th >クローラー巡回頻度</th>
				    <td >
					{html_radios name=crawler_rank options=$crawlerrankList selected=$formvars.crawler_rank|default:1}
				    </td>
				  </tr>
				  <tr>
				    <th>文字コード</th>
				    <td>
					{html_options name=enc options=$encList selected=$formvars.enc}
					</td>
				  </tr>
				  <tr>
				    <th width="150" >&nbsp;</th>
				    <td width="450" >      
					<input type="submit" value="更新" class="submitButton">
				    <input type="reset"  value="リセット" class="submitButton">
					<input type="button"  value="戻る" OnClick="doBack();" class="submitButton"></td>
					</td>
				  </tr>
				</table>
				<br>

				</form>				
			 	 </div>
			</div>
		</div>
		<!-- end #content -->
		<!-- end #sidebar -->
		<div style="clear: both; height: 20px;">&nbsp;</div>
	</div>
	<!-- end #page -->
</div>
{include file='footer.tpl'}


</body>
</html>
